﻿@model PSU.Model.Areas.Instructor.Question.QuestionReplyViewModel
@{
    ViewData["Title"] = "新生疑问";
    ViewData["NavTitle"] = "新生疑问管理";
    ViewData["CurrName"] = "";
}

@section styles{
    <environment include="Development">
        <link href="~/css/template/simditor.css" rel="stylesheet" />
    </environment>
    <environment exclude="Development">
        <link href="~/css/template/simditor.min.css" rel="stylesheet" asp-append-version="true" />
    </environment>
}

<section class="content-header">
    <h1>
        新生疑问
        <small>Student's Question</small>
    </h1>
    <ol class="breadcrumb">
        <li>
            <a asp-area="Instructor" asp-controller="Home" asp-action="Index">
                <i class="fa fa-dashboard"></i> 首页
            </a>
        </li>
        <li>
            <a asp-area="Administrator" asp-controller="Admission" asp-action="Question">
                <i class="fa fa-dashboard"></i> 新生疑问
            </a>
        </li>
        <li class="active">回复</li>
    </ol>
</section>

<section class="content">
    <div class="row">
        <div class="col-md-12">
            <form class="form-horizontal" role="form" id="department_form">
                <div class="row">
                    <div class="col-md-12">
                        <div class="box box-solid">
                            <div class="box box-header">
                                <div class="box-title">疑问信息</div>
                            </div>
                            <div class="box-body">
                                <div class="form-group">
                                    <label class="col-md-2 control-label no-padding-right" for="name">
                                        学生姓名
                                    </label>
                                    <div class="col-md-2">
                                        <input class="form-control" id="name" type="text" placeholder="" asp-for="StuName" readonly>
                                    </div>
                                    <label class="col-md-2 control-label no-padding-right" for="askfor">
                                        提问对象名称
                                    </label>
                                    <div class="col-md-2">
                                        <input type="text" class="form-control" asp-for="AskForName" id="askfor" readonly />
                                    </div>
                                    <label class="col-md-2 control-label no-padding-right" for="asktime">
                                        提问时间
                                    </label>
                                    <div class="col-md-2">
                                        <input type="text" class="form-control" id="asktime" asp-for="AskTime" readonly />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-md-2 control-label no-padding-right" for="replyname">
                                        回复人
                                    </label>
                                    <div class="col-md-2">
                                        <input type="text" class="form-control" id="replyname" asp-for="ReplyName" readonly />
                                    </div>
                                    <label class="col-md-2 control-label no-padding-right" for="replytime">
                                        回复时间
                                    </label>
                                    <div class="col-md-2">
                                        <input type="text" class="form-control" id="replytime" asp-for="ReplyTime" readonly />
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="box box-solid">
                            <div class="box box-header">
                                <div class="box-title">提问内容</div>
                            </div>
                            <div class="box-body">
                                <div class="row">
                                    <div class="col-md-12 col-xs-12">
                                        @Html.Raw(Model.Content)
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-12">
                        <div class="box box-solid">
                            <div class="box box-header">
                                <div class="box-title">回复内容</div>
                            </div>
                            <div class="box-body">
                                <div class="row">
                                    <div class="col-md-12 col-xs-12">
                                        @if (Model.IsReply)
                                        {
                                            @Html.Raw(Model.ReplyContent)
                                        }
                                        else
                                        {
                                            <textarea id="editor" class="form-control" maxlength="500"></textarea>
                                        }
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="clearfix">
                    <div class="text-right">
                        @if (!Model.IsReply)
                        {
                            <a class="btn btn-success" id="save" data-id="@Model.Id">
                                <i class="fa fa-check"></i>
                                回复
                            </a>
                        }
                        &nbsp; &nbsp;
                        <a class="btn btn-default" asp-area="Instructor" asp-controller="Question" asp-action="Information">
                            <i class="fa fa-undo"></i>
                            返回
                        </a>
                    </div>
                </div>
            </form>
        </div>
    </div>
</section>

@section scripts{
    <environment include="Development">
        <script src="~/javascript/template/module.js"></script>
        <script src="~/javascript/template/hotkeys.js"></script>
        <script src="~/javascript/template/uploader.js"></script>
        <script src="~/javascript/template/simditor.js"></script>
        <script src="~/javascript/view/Instructor/reply.js" asp-append-version="true"></script>
    </environment>
    <environment exclude="Development">
        <script src="~/javascript/view/Instructor/reply.min.js" asp-append-version="true"></script>
    </environment>
}